package com.hk.D;

import com.hk.D.demo.Assignment;
import com.hk.D.demo.Course;
import com.hk.D.demo.Module;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

@Configuration
public class AppContext {

    @Bean(initMethod = "init" , destroyMethod = "destroy")
    public Assignment assignment(){
        return  new Assignment();

    }


    @Bean
    public Module module(Assignment assignment){
        return new Module(assignment);
    }

    @Bean
    public Course course(Module module){
        return new Course(module);
    }


}
